<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    /* 固定定位‘
        1.参考位置：浏览器的四个角 */
    .test1,
    .test2,
    .test3,
    .test4 {
        height: 200px;
        width: 200px;
        background-color: greenyellow;
        position: fixed;
    }

    .test2 {
        background-color: red;
        bottom: 100px;


    }
</style>

<body>

    <div class="test1">


    </div>
    <div class="test2">


    </div>
    <div class="test3">


    </div>
    <div class="test4">


    </div>
</body>

</html>